package com.chaopei.activemq_consumer.service.impl;

import com.chaopei.activemq_consumer.service.ConsumerService;
import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Service;

/**
 * @Author Corday 天涯
 * @Date 2022/5/14 22:04
 */
@Service
public class ConsumerServiceImpl implements ConsumerService {
    @JmsListener(destination = "tom")
    @Override
    public void updateDatabase(String data) {
        //实现更多的业务,比如更新库存,缓加载,解决高并发
        System.out.println("consumer："+data);
    }
    @JmsListener(destination = "tom")
    public void go(String data){
        //实现更多的业务,比如:处理日志文件,后台下载文件
        System.out.println("接收:"+data);
    }
}
